function dologin(){
	 layer.load(1);
	
    $.ajax({
    	url:ajax_host +'dologin.act',
    	type:'post',
    	dataType:'JSON',
    	data:{
    		name:$('#name').val(),
    		pwd:$('#pwd').val(),
    		code:$('#code').val()
    },
  //登录成功后跳转页面
	success : function(resp){
		console.log(resp);
		if(resp.success){
			layer.closeAll('loading');
			layer.confirm('登录成功',{btn:['确定']},function(){
				window.location.href = "page.act?p="+resp.date+"&int="+Math.random();
			});
			
		}else{
			layer.closeAll('loading');
			layer.alert(resp.errmsg);
		}
		
	}
    
    })

}
function captcha(){
	console.log('看不清换一张')
	document.getElementById('captcha').src="captcha.act?"+Math.random();

}